#pragma once

#ifndef MYLIB_H
#define MYLIB_H

#include <comdef.h>

#ifdef _MSC_VER
#ifdef LIB_STATIC
#define LIB_API
#elif defined LIB_EXPORTS
#define LIB_API __declspec(dllexport)
#else
#define LIB_API __declspec(dllimport)
#endif
#endif

#ifdef __cplusplus
extern "C"
{
#endif

    LIB_API void MyLibInit();

    LIB_API void MyLibFinit();

    LIB_API bool MyGetMessage(char *buffer, unsigned long *pSize);

    LIB_API BSTR MyGetBStr();

    LIB_API SAFEARRAY* MyGetCStr();

    LIB_API SAFEARRAY* MyGetWStr();

    LIB_API bool MySetMessage(const char* msg);

    LIB_API bool MyGetImage(SAFEARRAY *&data);

    LIB_API bool MyGetResult(SAFEARRAY *&data);

    LIB_API int MyAdd(int a, int b);

#ifdef __cplusplus
}
#endif

#endif // MYLIB_H